package com.bootdo.xzl.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import com.bootdo.xzl.dao.EntrustmentInfoDao;
import com.bootdo.xzl.domain.EntrustmentInfoDO;
import com.bootdo.xzl.service.EntrustmentInfoService;



@Service
public class EntrustmentInfoServiceImpl implements EntrustmentInfoService {
	
	@Value("${number}")
	private int number;
	
	@Autowired
	private EntrustmentInfoDao entrustmentInfoDao;
	
	@Override
	public EntrustmentInfoDO get(Integer id){
		return entrustmentInfoDao.get(id);
	}
	
	@Override
	public List<EntrustmentInfoDO> list(Map<String, Object> map){
		return entrustmentInfoDao.list(map);
	}
	
	@Override
	public int count(Map<String, Object> map){
		return entrustmentInfoDao.count(map);
	}
	
	@Override
	public int save(EntrustmentInfoDO entrustmentInfo){
		return entrustmentInfoDao.save(entrustmentInfo);
	}
	
	@Override
	public int update(EntrustmentInfoDO entrustmentInfo){
		return entrustmentInfoDao.update(entrustmentInfo);
	}
	
	@Override
	public int remove(Integer id){
		return entrustmentInfoDao.remove(id);
	}
	
	@Override
	public int batchRemove(Integer[] ids){
		return entrustmentInfoDao.batchRemove(ids);
	}

	
	@Override
	public int count() {
		
		int count = entrustmentInfoDao.count(new HashMap<String, Object>(0));
		
		return number+count;
	}
	
}
